package com.sx.pipeline.ui

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.navigation.Navigation
import androidx.navigation.ui.NavigationUI
import com.alibaba.android.arouter.facade.annotation.Route
import com.gyf.immersionbar.ImmersionBar
import com.sx.mvvmlibs.base.NoVMBaseActivity
import com.sx.pipeline.R
import com.sx.pipeline.arouth.RouteManager
import com.sx.pipeline.arouth.RoutePath
import com.sx.pipeline.databinding.ActMainBinding


/**
 * @Author: YY
 * @Date: 2022/4/5
 * @Description: 主页
 */
//@Route(path = RoutePath.Main.MAIN)
class MainActivity : NoVMBaseActivity<ActMainBinding>() {

    override fun initBinding(inflater: LayoutInflater, container: ViewGroup?) =
        ActMainBinding.inflate(inflater)

    override fun initStatusBar() {
        // 设置状态栏字体颜色
        ImmersionBar.with(this)
            .fitsSystemWindows(true)
            .statusBarDarkFont(true)
            .init()
    }

    override fun initData() {

        mBinding.navView.itemIconTintList = null
        mBinding.navView.setOnItemReselectedListener {}
        val navController = Navigation.findNavController(
            this, R.id.nav_host_fragment_activity_main
        )
        NavigationUI.setupWithNavController(mBinding.navView, navController)
    }

    override fun initListener() {
        super.initListener()
        mBinding.imageRelease.setOnClickListener { RouteManager.Mine.intentToProvideInfo() }
    }

}